package com.tencent.trtc.apiexample;

import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.view.View;
import android.widget.EditText;

import androidx.appcompat.app.AppCompatActivity;

import com.tencent.trtc.audiocall.AudioCallingEnterActivity;
import com.tencent.trtc.screenshare.ScreenEntranceActivity;
import com.tencent.trtc.videocall.VideoCallingEnterActivity;

/**
 * TRTC API-Example 主页面
 *
 * 其中包含
 * 基础功能模块如下：
 * - 语音通话模块{@link AudioCallingEnterActivity}
 * - 视频通话模块{@link VideoCallingEnterActivity}
 * - 直播分享模块{@link ScreenEntranceActivity}

 */
public class MainActivity extends AppCompatActivity {


    private EditText etAccount,etPassword;
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        getSupportActionBar().hide();

        new Handler().postDelayed(new Runnable() {
            @Override
            public void run() {
                findViewById(R.id.launch_view).setVisibility(View.GONE);
            }
        }, 1000);

        findViewById(R.id.ll_audio_call).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Intent intent = new Intent(MainActivity.this, AudioCallingEnterActivity.class);
                startActivity(intent);
            }
        });

        findViewById(R.id.ll_video_call).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Intent intent = new Intent(MainActivity.this, VideoCallingEnterActivity.class);
                startActivity(intent);
            }
        });


        findViewById(R.id.ll_screen_share).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Intent intent = new Intent(MainActivity.this, ScreenEntranceActivity.class);
                startActivity(intent);
            }
        });



    }
}
